import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'lucide:layout-dashboard',
      order: -1,
      title: $t('page.dashboard.xtgl'),
    },
    name: 'Xtgl',
    path: '/xtgl',
    children: [
      {
        name: 'log',
        path: '/log',
        meta: {
          icon: 'lucide:area-chart',
          title: $t('page.dashboard.xtgl_log'),
        },
        children: [
          {
            path: '/action',
            name: 'action',
            component: () => import('#/views/xtgl/log/action/index.vue'),
            meta: {
              title: $t('page.dashboard.xtgl_log_action'),
              icon: 'lucide:area-chart',
            },
          },
          {
            path: '/login',
            name: 'loginlog',
            component: () => () => import('#/views/xtgl/log/login/index.vue'),
            meta: {
              title: $t('page.dashboard.xtgl_log_loginlog'),
              icon: 'lucide:area-chart',
            },
          },
        ],
      },
      {
        name: 'user',
        path: '/user',
        component: () => import('#/views/xtgl/user/index.vue'),
        meta: {
          icon: 'carbon:workspace',
          title: $t('page.dashboard.xtgl_user'),
        },
      },
    ],
  },
];

export default routes;
